import instance from "../url/docx.js";
import { get_export_file } from "../static/js/files/lifedata.js";
import { failure } from "@/static/js/alert.js";
const export_pre_memory = async function (user_id, data) { 
    await instance.post(`/deal/export?user_id${user_id}`, data, {
          headers: {
            'Content-Type': 'multipart/form-data'
        }
    })
        .then((response) => { 
            if (response) {
                get_export_file(response.name, response.title)
            } else { 
                failure("出错!")
            }
        })
    
}

export { 
      export_pre_memory 
} 